<%--
  Created by IntelliJ IDEA.
  User: zhaoyang
  Date: 2020/8/3
  Time: 11:37 上午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>登录</title>
</head>
<body>
<%
    // 4：登录的时候，在login.jsp中，如果已经登录，则提示欢迎信息，否则显示登录框(提示：用session判断)。
    if (session.getAttribute("USER_LOGIN") != null) {
%>
<script>
    alert("您已登陆！")
    location.replace("welcome.jsp");
</script>
<%
    }
%>

<div>
    <form method="post" action="doLogin.jsp">
        <input type="text" name="username" placeholder="请输入账号">
        <input type="password" name="userpass" placeholder="请输入密码">
        <input type="submit" value="登录">
    </form>

</div>
</body>
</html>
